/* 
 *  This file contains the function headers. 
 */

/* eval_expr.c */
double eval_expr_evaluate_operator(int operator_id, double *arguments);
int eval_expr_get_operator_id(char operator);
int eval_expr_operator_precedence(int operator);
int eval_expr_is_operator_left_associative(int operator);
unsigned int eval_expr_arg_count_operator(int operator);
double eval_expr_get_number(char *init_pos, char **end_pos);
void eval_expr_get_string(char *init_pos, char *string, char **end_pos);
void eval_expr_shunting_yard(char *input, struct eval_expr_param *param, struct rpn_stack *stack_rpn);
double eval_expr_evaluation(struct eval_expr_param *param, struct rpn_stack *stack_rpn);
/* functions.c */
struct list_functions *list_functions_allocate(int nitems);
double list_functions_evaluate(struct list_functions *lfu, unsigned int function_id, double *arguments);
int list_functions_get_function_id(struct list_functions *lfu, char *name);
char *list_functions_get_name(struct list_functions *lfu, int function_id);
int list_functions_get_arg_count(struct list_functions *lfu, int function_id);
int list_functions_get_first_free(struct list_functions *lfu);
int list_functions_register_function1(struct list_functions *lfu, char *name, double (*f1)(double));
int list_functions_register_function2(struct list_functions *lfu, char *name, double (*f2)(double, double));
int list_functions_register_function3(struct list_functions *lfu, char *name, double (*f3)(double, double, double));
double so2(double a, double b, double c);
void list_functions_init_default(struct list_functions *lfu);
void list_functions_free(struct list_functions *lfu);
/* main.c */
int main(int argc, char **argv);
/* rpn_stack.c */
struct rpn_stack *rpn_stack_allocate(int nitems);
int rpn_stack_get_nitems(struct rpn_stack *r);
void rpn_stack_insert_number(struct rpn_stack *r, double number);
void rpn_stack_insert_operator(struct rpn_stack *r, int operator_id);
void rpn_stack_insert_function(struct rpn_stack *r, int function_id);
void rpn_stack_insert_variable(struct rpn_stack *r, int variable_id);
void rpn_stack_insert_lparenthesis(struct rpn_stack *r);
void rpn_stack_insert_item(struct rpn_stack *r, struct rpn_stack_item *el);
struct rpn_stack_item *rpn_stack_get_item(struct rpn_stack *r, int index);
struct rpn_stack_item *rpn_stack_get_previous_item(struct rpn_stack *r);
int rpn_stack_get_type_item(struct rpn_stack *r, int index);
int rpn_stack_get_previous_type_item(struct rpn_stack *r);
void rpn_stack_pop_and_insert_one_item(struct rpn_stack *dest, struct rpn_stack *orig);
void rpn_stack_free(struct rpn_stack *r);
/* variables.c */
struct list_variables *list_variables_allocate(int nitems);
double list_variables_get_value(struct list_variables *lva, unsigned int variable_id);
unsigned int list_variables_get_variable_id(struct list_variables *lva, char *name);
char *list_variables_get_name(struct list_variables *lva, int variable_id);
int list_variables_set_variable(struct list_variables *lva, char *name, double value);
void list_variables_init_default(struct list_variables *lva);
void list_variables_free(struct list_variables *lva);
